package org.example;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

public class Test {
	public static void main(String[] args) {
		ThreadPoolExecutor executor = new ThreadPoolExecutor(
				10,
				20,
				1,
				TimeUnit.SECONDS,
				new LinkedBlockingQueue<>(50),
				(command, threadPoolExecutor) -> System.out.println("command = " + command.toString())
		);
		for (int i = 0; i < 100; i++) {
			executor.execute(() -> {
				System.out.println("Hello");
			});
		}
	}
}
